<h1>Sign up as a new user</h1>
<%  unless @user.nil?
      @user.password = nil
      @user.password_confirmation = nil
    end
%>


<% if flash[:notice] %>
    <div class="notice" style="color: green;"><%= raw flash[:notice] %></div>
<% end %>
<% if flash[:error] %>
    <div class="flash error"><p><%= raw flash[:error] %></p></div>
<% end %>

<%= form_for  @user, :url => { :action => "create" } do |f| %>
  <table cellpadding="5" cellspacing="10">
    <th align="center">All fields are required. </th>
    <tr>
    <td align="right"><%= f.label :login, 'Username:', :class => 'form_text_field_label'%></td>
    <td><%= f.text_field :login, :class => 'form_text_field' %></td>
    </tr>
    <tr>
      <td align="right"><%= f.label :password, '<b>Password:</b> <br/><font style="font-size:10px"> (no symbols or spaces please!)</font>'.html_safe, :class=> 'form_text_field_label' %></td>
      <td><%= f.password_field :password, :class=>'form_text_field' %></td>
    </tr>
    <tr>
      <td align="right"><%= label_tag :password_confirmation, 'Repeat password:', :class=> 'form_text_field_label' %></td>
      <td><%= f.password_field :password_confirmation, :class => 'form_text_field' %></td>
    </tr>
    <tr>
      <td align="right"><%= label_tag :email, 'E-mail address:',:class=> 'form_text_field_label' %></td>
      <td><%= f.text_field :email, :class=> 'form_text_field'%></td>
    </tr>
    <tr>
      <td align="right"><%= label_tag :location, '<b>Home town:</b> <br/><font style="font-size:10px"> (please write City, Country)</font>'.html_safe, :class=> 'form_text_field_label' %></td>
      <td><%= f.text_field :location, :class=> 'form_text_field' %></td>
    </tr>
    <tr>
    <td align="right"><%= label_tag :phonemodel, 'Mobile phone brand & model:', :class=> 'form_text_field_label' %></td>
      <td><%= f.text_field :phonemodel, :class=> 'form_text_field' %></td>
    </tr>
    <tr>
      <td align="right" style="vertical-align: top;">
        <span class="form_text_field_label"> Are you human? </span>
      </td>
      <td>
        <%= recaptcha_tags %>
      </td>
    </tr>
    <tr>
      <td>

      </td>
      <td>
        <%= submit_tag 'Sign up' %>
      </td>
    </tr>
  </table>

<% end -%>

